﻿@using BXJG.Utils.Application.Share.Dtos
@using Microsoft.AspNetCore.Components.Sections
@using ZLJ.Application.Share.Post

@* 可能用弹窗或页面承载，所以核心组件不应该这样判断权限 *@
@* @attribute [Authorize(PermissionNames.AdministratorBaseInfoPost)] *@

@inherits CreateBaseComponent< PostDto,CreatePostDto>

<SectionContent SectionName=@(FuncName + "-create-body")>
    <Form @ref="frm" ValidateOnChange="true" Model="createDto" LabelColSpan="4" WrapperColSpan="20" OnFinish="OnFinish">

        <Descriptions Bordered Size="small">
            <DescriptionsItem Title="名称" >
                <Input @bind-Value="@context.DisplayName" />
            </DescriptionsItem>
            <DescriptionsItem Title="备注">
                <Input @bind-Value="@context.Description" />
            </DescriptionsItem>
        </Descriptions>




    </Form>
</SectionContent>

<SectionContent SectionName=@(FuncName + "-create-btns")>
    <Checkbox @bind-Checked=isSaveAndContinue>保存后继续新增</Checkbox>
    <Button OnClick="BtnResetClick" Icon=@IconType.Outline.Redo>重置</Button>
    <Button OnClick="BtnSaveClick" Type=@ButtonType.Primary Loading=isSaving Disabled=isSaving Icon=@IconType.Outline.Save>保存</Button>
</SectionContent>